<%@page import="com.model.UserTable"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生信息管理系统</title>
</head>
<body>
	<%	request.setCharacterEncoding("utf-8"); %>
	<jsp:useBean id="user" class="com.model.UserTable" ></jsp:useBean>
	<jsp:useBean id="vali" class="com.jdbc.DAO.ValidateUser"></jsp:useBean>
	<jsp:setProperty property="*" name="user"/>
	<%  
		String path = request.getContextPath();
		if(vali.valiUser(user)){
			session.setAttribute("user", user);
			request.getRequestDispatcher("main.jsp").forward(request, response);
		}else
			response.sendRedirect(path + "/index.jsp");
	%>
	
</body>
</html>